Skip to main content

CC Switch

CC Switch is a cross-platform desktop app for centrally managing provider configurations across AI coding CLI tools. Official site: ccswitch.co

1.1 Usage

HPC-AI is not included in CC Switch's built-in preset list. Add it as a Custom provider for each app you use.

Prerequisites

  1. Create an API key at Models Console.
  2. Install CC Switch from GitHub Releases.

Do not use Universal Provider for HPC-AI. Claude Code and OpenAI-compatible apps require different base URLs, so configure each app separately.

Repeat these steps for each app you want to connect (Claude Code, Codex, OpenCode, OpenClaw, or Hermes Agent):

  1. Select the target app from the top selector in CC Switch.
  2. Click + to open Add Provider.
  3. Choose Custom (Claude Code, Codex, Hermes) or OpenAI Compatible (OpenCode, OpenClaw).
  4. Set Name to HPC-AI.
  5. Enter your HPC-AI API key.
  6. Set Endpoint URL:
    • Claude Code: https://api.hpc-ai.com/inference
    • Codex, OpenCode, OpenClaw, Hermes: https://api.hpc-ai.com/inference/v1
  7. Set the model to zai-org/glm-5.1, or click Fetch Models (OpenAI-compatible apps) and select it from the list.
  8. Click Add, then click Enable on the provider card.

Method 2: Per-App Configuration Examples

CC Switch writes these files when you save a provider. You can paste equivalent JSON in the provider editor when using the Custom preset.

Claude Code

Endpoint URL: https://api.hpc-ai.com/inference

{
"env": {
"ANTHROPIC_API_KEY": "your-hpc-ai-api-key",
"ANTHROPIC_BASE_URL": "https://api.hpc-ai.com/inference",
"ANTHROPIC_MODEL": "zai-org/glm-5.1"
}
}

Keep API Format as Anthropic Messages (default). If Fetch Models is unavailable for this endpoint, enter zai-org/glm-5.1 manually.

Codex Desktop

Switch to the Codex tab, choose Custom, and set:

  • Endpoint URL: https://api.hpc-ai.com/inference/v1
  • Model: zai-org/glm-5.1
  • Do not enable Needs Local Routing (HPC-AI supports the Responses API directly).

CC Switch generates:

~/.codex/auth.json:

{
"OPENAI_API_KEY": "your-hpc-ai-api-key"
}

~/.codex/config.toml:

model_provider = "custom"
model = "zai-org/glm-5.1"

[model_providers.custom]
name = "custom"
base_url = "https://api.hpc-ai.com/inference/v1"
wire_api = "responses"
requires_openai_auth = true

Restart Codex Desktop after enabling the provider, then select zai-org/glm-5.1 in the model picker.

For Codex CLI-only setup (profiles, project config, env_key), see Codex.

OpenCode

Choose OpenAI Compatible:

  • Endpoint URL: https://api.hpc-ai.com/inference/v1
  • Model: zai-org/glm-5.1

OpenClaw

Choose OpenAI Compatible:

  • Endpoint URL: https://api.hpc-ai.com/inference/v1
  • Model: zai-org/glm-5.1

Hermes Agent

Choose Custom or OpenAI Compatible:

  • Endpoint URL: https://api.hpc-ai.com/inference/v1
  • Model: zai-org/glm-5.1
  • API mode: chat_completions

Verify Configuration

  1. Enable the HPC-AI provider in CC Switch.
  2. Claude Code: run claude and send a test prompt (changes apply without restarting the terminal).
  3. Codex Desktop: restart the app, select zai-org/glm-5.1, and send a test message.
  4. OpenCode / OpenClaw / Hermes: close and reopen the terminal, then start the tool again.

If Claude Code prompts you to log in on first launch, enable Skip Claude Code initial setup confirmation in CC Switch Settings → General, then restart Claude Code.

1.2 Notes

  1. Fetch Models: On OpenCode, OpenClaw, Hermes, and Codex, CC Switch calls GET /v1/models on the configured endpoint. This requires a valid API key. If the request fails, enter zai-org/glm-5.1 manually.
  2. Activation timing: Claude Code supports hot reload. Codex Desktop, OpenCode, OpenClaw, and Hermes require restarting the app or terminal session after switching providers.
  3. Model ID: Use the exact model ID returned by the List Models API.

1.3 References